UPDATE FLW_PAL_DATABASECHANGELOGLOCK SET LOCKED = 1, LOCKEDBY = 'Tijs-new-macbook-pro.local (192.168.68.127)', LOCKGRANTED = SYSTIMESTAMP WHERE ID = 1 AND LOCKED = 0;


UPDATE FLW_PAL_DATABASECHANGELOGLOCK SET LOCKED = 0, LOCKEDBY = NULL, LOCKGRANTED = NULL WHERE ID = 1;

UPDATE FLW_LIC_DATABASECHANGELOGLOCK SET LOCKED = 1, LOCKEDBY = 'Tijs-new-macbook-pro.local (192.168.68.127)', LOCKGRANTED = SYSTIMESTAMP WHERE ID = 1 AND LOCKED = 0;


UPDATE FLW_LIC_DATABASECHANGELOGLOCK SET LOCKED = 0, LOCKEDBY = NULL, LOCKGRANTED = NULL WHERE ID = 1;

UPDATE ACT_DE_DATABASECHANGELOGLOCK SET LOCKED = 1, LOCKEDBY = 'Tijs-new-macbook-pro.local (192.168.68.127)', LOCKGRANTED = SYSTIMESTAMP WHERE ID = 1 AND LOCKED = 0;


CREATE INDEX ACT_DE_IDX_MODEL_REL_APP_ID ON ACT_DE_MODEL_RELATION(app_model_id);

CREATE INDEX ACT_DE_IDX_MODEL_REL_PARENT_ID ON ACT_DE_MODEL_RELATION(parent_model_id);

CREATE INDEX ACT_DE_IDX_MODEL_REL_MODEL_ID ON ACT_DE_MODEL_RELATION(model_id);

INSERT INTO ACT_DE_DATABASECHANGELOG (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('63', 'flowable', 'META-INF/liquibase/flowable-modeler-app-db-changelog.xml', SYSTIMESTAMP, 29, '9:e15d8b5f84e887f801fb77b36f71f96a', 'createIndex indexName=ACT_DE_IDX_MODEL_REL_APP_ID, tableName=ACT_DE_MODEL_RELATION; createIndex indexName=ACT_DE_IDX_MODEL_REL_PARENT_ID, tableName=ACT_DE_MODEL_RELATION; createIndex indexName=ACT_DE_IDX_MODEL_REL_MODEL_ID, tableName=ACT_DE_MODEL_...', '', 'EXECUTED', NULL, NULL, '4.27.0', '9308570923');

CREATE TABLE FLW_DE_MODEL_STAR (USER_ID_ VARCHAR2(255) NOT NULL, MODEL_ID_ VARCHAR2(255) NOT NULL);

ALTER TABLE FLW_DE_MODEL_STAR ADD CONSTRAINT FLW_DE_FK_MODEL_STAR_MODEL_ID FOREIGN KEY (MODEL_ID_) REFERENCES ACT_DE_MODEL (id) ON DELETE CASCADE;

ALTER TABLE FLW_DE_MODEL_STAR ADD CONSTRAINT FLW_DE_UQ_MODEL_STAR_USR_MODEL UNIQUE (USER_ID_, MODEL_ID_);

INSERT INTO ACT_DE_DATABASECHANGELOG (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('64', 'flowable', 'META-INF/liquibase/flowable-modeler-app-db-changelog.xml', SYSTIMESTAMP, 30, '9:c9fb066df5f0575ba1b18ab3930321a9', 'createTable tableName=FLW_DE_MODEL_STAR; addForeignKeyConstraint baseTableName=FLW_DE_MODEL_STAR, constraintName=FLW_DE_FK_MODEL_STAR_MODEL_ID, referencedTableName=ACT_DE_MODEL; addUniqueConstraint constraintName=FLW_DE_UQ_MODEL_STAR_USR_MODEL, ta...', '', 'EXECUTED', NULL, NULL, '4.27.0', '9308570923');

ALTER TABLE ACT_DE_MODEL_RESOURCE ADD CREATOR_ID_ VARCHAR2(255);

ALTER TABLE ACT_DE_MODEL_RESOURCE ADD UPDATE_TIME_ TIMESTAMP;

ALTER TABLE ACT_DE_MODEL_RESOURCE ADD UPDATER_ID_ VARCHAR2(255);

INSERT INTO ACT_DE_DATABASECHANGELOG (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('65', 'flowable', 'META-INF/liquibase/flowable-modeler-app-db-changelog.xml', SYSTIMESTAMP, 31, '9:13c8828490886516e8298ff8eb8b8940', 'addColumn tableName=ACT_DE_MODEL_RESOURCE', '', 'EXECUTED', NULL, NULL, '4.27.0', '9308570923');

ALTER TABLE FLW_DE_WORKSPACE ADD ALLOWED_PACKAGE_TYPE_ INTEGER DEFAULT 3 NOT NULL;

INSERT INTO ACT_DE_DATABASECHANGELOG (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('67', 'flowable', 'META-INF/liquibase/flowable-modeler-app-db-changelog.xml', SYSTIMESTAMP, 32, '9:773de7412ecba4f06aa1911492808de5', 'addColumn tableName=FLW_DE_WORKSPACE', '', 'EXECUTED', NULL, NULL, '4.27.0', '9308570923');

CREATE TABLE FLW_DE_PLUGIN (ID_ VARCHAR2(255) NOT NULL, REV_ INTEGER NOT NULL, KEY_ VARCHAR2(255) NOT NULL, NAME_ VARCHAR2(255), VERSION_ VARCHAR2(255) NOT NULL, MAJOR_VERSION_ INTEGER NOT NULL, MINOR_VERSION_ INTEGER NOT NULL, PATCH_VERSION_ INTEGER NOT NULL, DESCRIPTION_ VARCHAR2(4000), TENANT_ID_ VARCHAR2(255), RELEASE_DATE_ TIMESTAMP(6), INSTALLATION_DATE_ TIMESTAMP(6), CONSTRAINT PK_FLW_DE_PLUGIN PRIMARY KEY (ID_), CONSTRAINT FLW_DE_FK_PLUGIN_TENANT FOREIGN KEY (TENANT_ID_) REFERENCES FLW_DE_TENANT(ID_));

CREATE UNIQUE INDEX FLW_DE_IDX_PLUGIN_KEY_VER_TEN ON FLW_DE_PLUGIN(KEY_, VERSION_, TENANT_ID_);

CREATE TABLE FLW_DE_PLUGIN_RESOURCE (ID_ VARCHAR2(255) NOT NULL, NAME_ VARCHAR2(255) NOT NULL, PLUGIN_ID_ VARCHAR2(255) NOT NULL, REFERENCE_ VARCHAR2(255), REFERENCE_TYPE_ VARCHAR2(255), GENERATED_ NUMBER(1), RESOURCE_BYTES_ BLOB, CONSTRAINT PK_PLUGIN_RES PRIMARY KEY (ID_), CONSTRAINT FLW_DE_FK_PLUGIN_RES_PLUGIN FOREIGN KEY (PLUGIN_ID_) REFERENCES FLW_DE_PLUGIN(ID_));

CREATE INDEX FLW_DE_FK_PLUGIN_RES_PLUGIN ON FLW_DE_PLUGIN_RESOURCE(PLUGIN_ID_);

CREATE TABLE FLW_DE_PLUGIN_LINK (ID_ VARCHAR2(255) NOT NULL, PLUGIN_KEY_ VARCHAR2(255) NOT NULL, PLUGIN_ID_ VARCHAR2(255) NOT NULL, USE_FIX_VERSION_ NUMBER(1) NOT NULL, SCOPE_ID_ VARCHAR2(255) NOT NULL, SCOPE_TYPE_ VARCHAR2(255) NOT NULL, TENANT_ID_ VARCHAR2(255) NOT NULL, CONSTRAINT PK_PLUGIN_LINK PRIMARY KEY (ID_));

ALTER TABLE FLW_DE_PLUGIN_LINK ADD CONSTRAINT FLW_DE_UQ_PLUG_LINK_KEY_SCOPE UNIQUE (PLUGIN_KEY_, SCOPE_ID_, SCOPE_TYPE_);

CREATE INDEX FLW_DE_IDX_PLUGIN_LINK_SCOPE ON FLW_DE_PLUGIN_LINK(SCOPE_ID_, SCOPE_TYPE_);

ALTER TABLE FLW_DE_PLUGIN_LINK ADD CONSTRAINT FLW_DE_FK_PLUGIN_LINK_PLUGIN FOREIGN KEY (PLUGIN_ID_) REFERENCES FLW_DE_PLUGIN (ID_);

CREATE INDEX FLW_DE_IDX_PLUGIN_LINK_PLUG_ID ON FLW_DE_PLUGIN_LINK(PLUGIN_ID_);

CREATE TABLE FLW_DE_PLUGIN_MODEL_RELATION (ID_ VARCHAR2(255) NOT NULL, MODEL_ID_ VARCHAR2(255) NOT NULL, PLUGIN_KEY_ VARCHAR2(255) NOT NULL, REFERENCE_KEY_ VARCHAR2(255) NOT NULL, REFERENCE_TYPE_ VARCHAR2(255) NOT NULL, TYPE_ VARCHAR2(255), WORKSPACE_ID_ VARCHAR2(255) NOT NULL, CONSTRAINT FLW_DE_PK_PLUGIN_MODEL_REL PRIMARY KEY (ID_), CONSTRAINT FLW_DE_FK_PLUGIN_REL_WORKSPACE FOREIGN KEY (WORKSPACE_ID_) REFERENCES FLW_DE_WORKSPACE(ID_), CONSTRAINT FLW_DE_FK_PLUGIN_REL_MODEL FOREIGN KEY (MODEL_ID_) REFERENCES ACT_DE_MODEL(id));

CREATE INDEX FLW_DE_IDX_PLUG_MOD_REL_MOD_ID ON FLW_DE_PLUGIN_MODEL_RELATION(MODEL_ID_);

INSERT INTO ACT_DE_DATABASECHANGELOG (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('68', 'flowable', 'META-INF/liquibase/flowable-modeler-app-db-changelog.xml', SYSTIMESTAMP, 33, '9:0f12b1f8de8f437d89eb919ae458d4e6', 'createTable tableName=FLW_DE_PLUGIN; createIndex indexName=FLW_DE_IDX_PLUGIN_KEY_VER_TEN, tableName=FLW_DE_PLUGIN; createTable tableName=FLW_DE_PLUGIN_RESOURCE; createIndex indexName=FLW_DE_FK_PLUGIN_RES_PLUGIN, tableName=FLW_DE_PLUGIN_RESOURCE; c...', '', 'EXECUTED', NULL, NULL, '4.27.0', '9308570923');

CREATE TABLE FLW_DE_DEPLOYMENT_SERVER_INFO (ID_ VARCHAR2(255) NOT NULL, SCOPE_ID_ VARCHAR2(255) NOT NULL, SCOPE_TYPE_ VARCHAR2(255) NOT NULL, NAME_ VARCHAR2(255) NOT NULL, TENANT_ID_ VARCHAR2(255), DEPLOYMENT_TENANT_ID_ VARCHAR2(255), BASE_SERVER_ADDRESS_ VARCHAR2(2000) NOT NULL, AUTHENTICATION_TYPE_ VARCHAR2(100), USER_INFO_ VARCHAR2(255), SECRET_ VARCHAR2(2000), CONSTRAINT FLW_DE_PK_DEPL_SERVER_INFO PRIMARY KEY (ID_));

INSERT INTO ACT_DE_DATABASECHANGELOG (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('69', 'flowable', 'META-INF/liquibase/flowable-modeler-app-db-changelog.xml', SYSTIMESTAMP, 34, '9:ae7276d2303cd8b23ec5fb84d5126016', 'createTable tableName=FLW_DE_DEPLOYMENT_SERVER_INFO', '', 'EXECUTED', NULL, NULL, '4.27.0', '9308570923');

CREATE TABLE FLW_DE_OAUTH_CLIENT_REG (ID_ VARCHAR2(255) NOT NULL, REGISTRATION_KEY_ VARCHAR2(255) NOT NULL, CLIENT_ID_ VARCHAR2(100) NOT NULL, CLIENT_SECRET_ VARCHAR2(255), CLIENT_NAME_ VARCHAR2(255), CLIENT_AUTHENTICATION_METHOD_ VARCHAR2(200), SCOPES_ VARCHAR2(2000), ISSUER_URI_ VARCHAR2(2000), TOKEN_URI_ VARCHAR2(2000), TENANT_ID_ VARCHAR2(255), CONSTRAINT FLW_DE_PK_OAUTH_CLIENT_REG PRIMARY KEY (ID_));

INSERT INTO ACT_DE_DATABASECHANGELOG (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('70', 'flowable', 'META-INF/liquibase/flowable-modeler-app-db-changelog.xml', SYSTIMESTAMP, 35, '9:577fc00426054a6fffff6cfc3ad94138', 'createTable tableName=FLW_DE_OAUTH_CLIENT_REG', '', 'EXECUTED', NULL, NULL, '4.27.0', '9308570923');

UPDATE ACT_DE_DATABASECHANGELOGLOCK SET LOCKED = 0, LOCKEDBY = NULL, LOCKGRANTED = NULL WHERE ID = 1;

